<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/taglib.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>企业首页-企业风采</title>

	<link rel="stylesheet" type="text/css" href="<c:url value="/css/header.css"/>"/>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/common.css"/>"/>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/public.css"/>"/>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/default.css"/>"/>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/footer.css"/>"/>
	<script type="text/javascript" src="<c:url value="/js/jquery.min.js"/>"></script>
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/style.css"/>"/>

<script type="text/javascript">
$(function(){
	var oFocus=$('#focus'),
		oRight=oFocus.find('.right'),
		oLeft=oFocus.find('.left'),
		aRLi=oRight.find('li'),
		aLLi=oLeft.find('li'),
		index=0,
		timer = null;
	aRLi.click(function(){
		index=$(this).index()
		$(this).addClass('active').siblings().removeClass();
		aLLi.eq(index).addClass('active').siblings().removeClass();
		aLLi.eq(index).stop().animate({'opacity':1},300).siblings().stop().animate({'opacity':0},300);
		stopFoucs();
	})
	oLeft.mouseenter(function(){
		stopFoucs();
	}).mouseleave(function(){		
		startFocus();
	});
	timer = setInterval(function(){
		startFocus();
	},5000);
	function startFocus(){
		index++;
		index = index > aRLi.size()-1 ? 0 :index;

		aLLi.eq(index).addClass('active').siblings().removeClass();
		aLLi.eq(index).stop().animate({'opacity':1},300).siblings().stop().animate({'opacity':0},300);
		aRLi.eq(index).addClass('active').siblings().removeClass();
	}
	function stopFoucs(){
		clearInterval(timer);
	}
})
</script>
</head>
<body>
	<jsp:include page="../common/hrheader.jsp"></jsp:include>
	
	<div class="focus" id="focus">
		<div class="left">
			<ul>
				
				<c:forEach var="photo" items="${photos }">
				<li style="opacity:1; filter:alpha(opacity=100);"><img src="${photo.path }" width="680px" height="415px"/></li>
				</c:forEach>
			</ul>
		</div>
		<div class="right">
			<ul>
				
				<c:forEach var="photo" items="${photos }" >
					<li><i class="i3"></i>图${photo.id }</li>
				</c:forEach>				
			</ul>
		</div>
	</div>	
	<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"></div>
	<jsp:include page="../common/footer.jsp"></jsp:include>
</body>
</html>